package com.knife.blog.logic.impl;

import com.knife.web.tools.DbPageList;
import com.knife.blog.domain.BlogNewsDir;
import com.knife.blog.domain.PhotoDir;
import com.knife.blog.logic.BlogPhotoDirService;
import com.knife.web.tools.IPageList;

public class BlogPhotoDirServiceImpl implements BlogPhotoDirService {

	private static BlogPhotoDirServiceImpl blogPhotoDirService = new BlogPhotoDirServiceImpl();

	public static BlogPhotoDirServiceImpl getInstance() {
		return blogPhotoDirService;
	}

	public boolean addBlogPhotoDir(BlogNewsDir dir) {
		return false;
	}

	public boolean delBlogPhotoDir(String cid) {
		return false;
	}

	public int batchDelBlogPhotoDir(String[] cids) {
		return 0;
	}

	public boolean updateBlogPhotoDir(BlogNewsDir dir) {
		return false;
	}

	public PhotoDir getBlogPhotoDir(String cid) {
		return null;
	}

	public IPageList queryBlogPhotoDir() {
		String scope = "1=1";
		return queryBlogPhotoDir(scope, null, 0, -1);
	}

	public IPageList queryBlogPhotoDir(String username, int currentPage,
			int pageSize) {
		String scope = "1=1";
		java.util.Collection<Object> paras = new java.util.ArrayList<Object>();
		paras.add(username);
		return queryBlogPhotoDir(scope, paras, currentPage, pageSize);
	}

	public IPageList queryBlogPhotoDir(String scope,
			java.util.Collection paras, int currentPage, int pageSize) {
		String sql = "";
		if (paras != null) {
			sql = " and inputuser=?";
		}
		if (scope != null) {
			sql = scope + sql;
		}
		DbPageList pList = new DbPageList(PhotoDir.class, sql, paras);
		pList.doList(currentPage, pageSize);
		return pList;
		// return null;
	}

	public IPageList getChildDirs(PhotoDir dir, int currentPage, int pageSize) {
		return null;
	}
}
